export {};

//定义抽象类，只可被继承
abstract class Animal {
  eat(food: string): void {
    console.log(`优雅的进餐${food}`);
  }
  //抽象方法必须在子类中实现
  abstract run(distance: number): void;
}

class Dog extends Animal {
  run(distance: number): void {
    console.log(`爬行${distance}`);
  }
}
